interface IUser {
  id: number
  name: string
  desc: number
  tannetIds: Array<Pick<ITannet, 'id'>>
}

interface ITannet {
  id: number
  name: number
  desc: number
  instanceIds: Array<Pick<IInstance, 'id'>>
}

interface IChart {
  id: number
  name: string // uniq
  title: string
  desc: string
}

interface IInstance {
  id: number

  width: string
  height: string
  cellCount: string

  chartConfiyIds: Array<Pick<IChartConfig<{}>, 'id'>>

  createAt: Date
  updateAt: Date
  creatorId: number
}

interface IChartConfig<E extends object = {}> {
  id: string
  chartId: number

  positionX: number
  positionY: number
  height: number // 百分比还是px
  width: number

  sourceUrl: string
  resultMapper: string

  subscribeIds: Array<Pick<IChartConfig<{}>, 'id'>>  // 监听组件的onChange 事件

  primaryColor: string

  extended: E // jsonb color/desc
  createAt: Date
  updateAt: Date
  deleteAt: Date
  creatorId: number
}